﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Configuration;

namespace Hope.Gallery.Core
{
    public static class ConfigKeys
    {
        private const string UploadRootKey = "UploadRoot";
        public static string UploadRoot
        {
            get
            {
                return ConfigurationManager.AppSettings[UploadRootKey].ToString();
            }
        }

        private const string ThumbSufixKey = "ThumbSufix";
        public static string ThumbSufix
        {
            get
            {
                return ConfigurationManager.AppSettings[ThumbSufixKey].ToString();
            }
        }

        private const string ThumbWidthKey = "ThumbWidth";
        public static int ThumbWidth
        {
            get
            {
                string text = ConfigurationManager.AppSettings[ThumbWidthKey].ToString();

                int value = 210; // default
                int.TryParse(text, out value);

                return value;
            }
        }

        private const string ThumbHeightKey = "ThumbHeight";
        public static int ThumbHeight
        {
            get
            {
                string text = ConfigurationManager.AppSettings[ThumbHeightKey].ToString();

                int value = 150; // default
                int.TryParse(text, out value);

                return value;
            }
        }



    }
}